home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 January / PCWorld_2007-01_cd.bin / v cisle / autoit / autoit-v3.2.0.1-setup.exe / Examples / Helpfile / GUICtrlCreateListView.au3 < prev    next >
Text File  |  2006-06-17  |  1KB  |  27 lines

  1. #include <GUIConstants.au3>
  2.  
  3. GUICreate("listview items",220,250, 100,200,-1,$WS_EX_ACCEPTFILES)
  4. GUISetBkColor (0x00E0FFFF)  ; will change background color
  5.  
  6. $listview = GUICtrlCreateListView ("col1  |col2|col3  ",10,10,200,150);,$LVS_SORTDESCENDING)
  7. $button = GUICtrlCreateButton ("Value?",75,170,70,20)
  8. $item1=GUICtrlCreateListViewItem("item2|col22|col23",$listview)
  9. $item2=GUICtrlCreateListViewItem("item1|col12|col13",$listview)
  10. $item3=GUICtrlCreateListViewItem("item3|col32|col33",$listview)
  11. $input1=GUICtrlCreateInput("",20,200, 150)
  12. GUICtrlSetState(-1,$GUI_DROPACCEPTED)   ; to allow drag and dropping
  13. GUISetState()
  14. GUICtrlSetData($item2,"ITEM1")
  15. GUICtrlSetData($item3,"||COL33")
  16. GUICtrlDelete($item1)
  17.  
  18. Do
  19.   $msg = GUIGetMsg ()
  20.       
  21.    Select
  22.       Case $msg = $button
  23.          MsgBox(0,"listview item",GUICtrlRead(GUICtrlRead($listview)),2)
  24.       Case $msg = $listview
  25.          MsgBox(0,"listview", "clicked="& GUICtrlGetState($listview),2)
  26.    EndSelect
  27. Until $msg = $GUI_EVENT_CLOSE